﻿using System.Windows.Controls;
using System;
using System.Windows;

namespace DotNetUI.Controls
{
    /// <summary>
    /// Dotnet加载动画控件
    /// </summary>
    public class DotNetLoading:ContentControl
    {
        static DotNetLoading()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DotNetLoading),new System.Windows.FrameworkPropertyMetadata(typeof(DotNetLoading)));
        }
        /// <summary>
        /// 忙碌标记
        /// </summary>
        public static readonly DependencyProperty IsBusyProperty = DependencyProperty.Register(nameof(IsBusy),typeof(bool),typeof(DotNetLoading));

        /// <summary>
        /// 忙碌标记
        /// </summary>
        public bool IsBusy { get=>this.GetValue<bool>(IsBusyProperty); set=>SetValue(IsBusyProperty,value); }
        /// <summary>
        /// 用来展示动画的内容
        /// </summary>
        public static readonly DependencyProperty AnimationContentProperty = DependencyProperty.Register(nameof(AnimationContent), typeof(FrameworkElement), typeof(DotNetLoading));
        /// <summary>
        /// 用来展示动画的内容
        /// </summary>
        public FrameworkElement AnimationContent { get=>this.GetValue<FrameworkElement>(AnimationContentProperty); set=>SetValue(AnimationContentProperty,value); }

    }
}
